import React from 'react';
import { Card, Form, Button } from 'antd';
import { connect } from 'dva';
import Flow2 from '@/pages/FormDesigner/templates/Flow2.js';

// const { Step } = Steps;

function OperView({ size: { height }, goToStep, record, mode }) {
  return (
    <div>
      <Card
        title="任务单详情"
        style={{ minHeight: height, paddingBottom: 40 }}
        extra={
          <Button type="primary" onClick={() => goToStep(1)}>
            返回
          </Button>
        }
      >
        <Flow2 {...record} mode={mode} />
        {/* <div className="ant-detail-title">任务处理流程</div>
        <StepList
          stepList={[
            {
              tacheCode: 'DDDSC',
              tacheName: '调度单生成',
              state: '10F',
              finished: true,
              current: false,
            },
            {
              tacheCode: 'KHYY',
              tacheName: '客户预约',
              state: '10D',
              finished: false,
              current: true,
            },
            {
              tacheCode: 'PSGD',
              tacheName: '派施工单',
              state: null,
              finished: false,
              current: false,
            },
            {
              tacheCode: 'DDFQRSH',
              tacheName: '订单发起人审核',
              state: null,
              finished: false,
              current: false,
            },
            {
              tacheCode: 'QYGLYSH',
              tacheName: '区域管理员审核',
              state: null,
              finished: false,
              current: false,
            },
          ]}
        />
        <Divider className="small" />
        <div className="ant-detail-title">任务单详情</div>
        <Descriptions column={4}>
          <Descriptions.Item label="任务单号">DD05505742</Descriptions.Item>
          <Descriptions.Item label="任务单名称">棒棒糖公司集团V网开通</Descriptions.Item>
          <Descriptions.Item label="任务发起时间">2020-05-15 14:50:11</Descriptions.Item>
          <Descriptions.Item label="任务创建人">管理员</Descriptions.Item>
          <Descriptions.Item label="集团编码">74120140</Descriptions.Item>
          <Descriptions.Item label="集团名称">乔丹鞋厂</Descriptions.Item>
          <Descriptions.Item label="集团客户行业">小花</Descriptions.Item>
          <Descriptions.Item label="集团联系人">小花花</Descriptions.Item>
          <Descriptions.Item label="集团联系人电话">15806029581</Descriptions.Item>
          <Descriptions.Item label="集团客户地址">西洪路363号(肝胆医院斜对面)</Descriptions.Item>
          <Descriptions.Item label="客户经理工号">likepeng</Descriptions.Item>
        </Descriptions>
        <Divider className="small" />
        <div className="ant-detail-title">任务单详情</div>
        <Form className="flow fix-label padding-bottom">
          <Row gutter={16}>
            <Col span={6}>
              <Form.Item label="任务单号">
                {getFieldDecorator('orderNumber', {
                  // initialValue: '11',
                })(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
            <Col span={6}>
              <Form.Item label="协议编码">
                {getFieldDecorator('contractCode')(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
            <Col span={6}>
              <Form.Item label="项目工单编码">
                {getFieldDecorator('busyCode')(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
            <Col span={6}>
              <Form.Item label="项目工单名称">
                {getFieldDecorator('busyName')(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
          </Row>
          <Row gutter={16}>
            <Col span={6}>
              <Form.Item label="任务单号">
                {getFieldDecorator('orderNumber', {
                  // initialValue: '11',
                })(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
            <Col span={6}>
              <Form.Item label="协议编码">
                {getFieldDecorator('contractCode')(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="项目工单编码">
                {getFieldDecorator('busyCode')(<Input allowClear placeholder="请输入" />)}
              </Form.Item>
            </Col>
          </Row>
        </Form>
        <Divider className="small" /> */}
      </Card>
    </div>
  );
}
// export default OperView;
export default connect(({ setting }) => ({
  size: setting.size,
}))(Form.create()(OperView));
